<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/list.css"/>
		<link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.css" rel="stylesheet">
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.js"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/locale/bootstrap-table-zh-CN.min.js"></script>
	</head>
	<body>
		<table id="express_list"></table>
		<script>
			$(function () {
				$("#express_list").bootstrapTable({//通过bootstrap-table插件显示数据，给出以下参数即可
					url:"/express/list.do",//数据请求地址
					striped:true,//是否显示行的间隔
					pageNumber:1,//初始化加载第几页
					pagination:true,//是否分页
					sidePagination:'server',//选择是服务器端分页还是客户端分页，如果选择客户端分页则服务器无需提供分页参数，客户端会自动分页。
					pageSize:5,//每一页显示的数量
					pageList:[5,10,20],//可选的每页显示的记录数
					showRefresh:true,//是否显示刷新按钮
					queryParams:function (params) {//给后台传递分页查询的参数的方法
						var temp = {//要发送给服务器的数据对象
							offset: params.offset,
							pageNumber: params.limit
						};
						return temp;
					},
					columns:[//页面显示的格式，title是页面中显示的东西，field是查询相应的bean类的属性名
						{
							title:"编号",
							field:"id",
							sortable:true//是否显示排序按钮，注意只有客户端分页才有排序效果
						},
						{
							title:"单号",
							field:"number",
							sortable:true
						},
						{
							title:"姓名",
							field:"username",
							sortable:true
						},
						{
							title:"电话",
							field:"userPhone",
							sortable:true
						},
						{
							title:"快递公司",
							field:"company",
							sortable:true
						},
						{
							title:"取件码",
							field:"code",
							sortable:true
						},
						{
							title:"入库时间",
							field:"inTime",
							sortable:true
						},
						{
							title:"出库时间",
							field:"outTime",
							sortable:true
						},
						{
							title:"状态",
							field:"status",
							sortable:true
						},
						{
							title:"录入人电话",
							field:"sysPhone",
							sortable:true
						},
					],
				})
			})
		</script>
	</body>
</html>
